import { request } from '@/utils/request'

const api = {
    getMenuCatalogList: '/system/catalog/getMenuCatalogList',
    getCatalogTree: '/system/catalog/getCatalogTree',
    getAmpCatalogTree: '/system/apmCatalog/getCatalogTree',
}
export default api

export function getMenuCatalogList () {
  //console.log('getMenuCatalogList = ')
  return request({
    url: api.getMenuCatalogList,
    method: 'GET'
  })
}

export function getCatalogTree (catalogId) {
  //console.log('getCatalogTree = ' + catalogId)
  return request({
    url: api.getCatalogTree + '?id=' + catalogId,
    method: 'GET'
  })
}

export function getAmpCatalogTree (parameter) {
    return request({
        url: api.getAmpCatalogTree,
        method: 'GET',
        params: parameter
    })
}

